//
//  TitleExpenseTypeCell.m
//  MoneyIndividual
//
//  Created by Le Anh Tai on 1/6/14.
//  Copyright (c) 2014 Le Anh Tai. All rights reserved.
//

#import "TitleExpenseTypeCell.h"

@implementation TitleExpenseTypeCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        NSMutableArray *expenseAccounts = [[NSMutableArray alloc] init];
        for (int i = TransactionTypeExpensePermanent; i <= TransactionTypeExpenseHui; i++)
        {
            [expenseAccounts addObject:[[CoreData shared].accounts objectAtIndex:i]];
        }
        
        _typeView.objects = expenseAccounts;
        _typeView.delegate = self;
        
        self.textField.inputView = _typeView;
        self.textField.clearButtonMode = UITextFieldViewModeNever;
    }
    
    return self;
}

@end
